CPP				= g++
CPPFLAGS		= -c -Wall -Wconversion -pedantic -g -O3 -fomit-frame-pointer -march=native
#CPPFLAGS		= -c -Wall -Wconversion -pedantic -g -O0 -march=core2 
GTKCFLAGS		= `pkg-config --cflags gtkmm-2.4`
LDFLAGS			= -lm -pthread -lrt
GTKLDFLAGS		= `pkg-config --libs gtkmm-2.4` -export-dynamic
OBJS			= $(patsubst %.c++,%.o,$(wildcard *.c++))
RM				= rm -f
MAKE			= make
TARGET			= mandelbrot

$(TARGET): $(OBJS)
	$(CPP) $(LDFLAGS) $(GTKLDFLAGS) -o $@ $(OBJS)

%.o: %.c++
	$(CPP) $(CPPFLAGS) $(GTKCFLAGS) -c $<

clean:
	$(RM) *.o core

distclean:
	$(MAKE) clean
	$(RM) $(TARGET)
